export const yDataHandler: Handler = {
    rate: (datas: Array<number>, step: number, divide: number = 1) => {
        return datas.map((value, index, array) => ((array[index + 1] - value) / step) / divide);
    },
    divide: (datas: Array<number>, step: number, divide: number) => {
        return datas.map((value, index, array) => (value / divide));
    }
};

interface Handler {
    [s: string]: (datas: Array<number>, step: number, divide: number) => Array<number>;
}
